<script>
export default {
	onLaunch: function() {

	},
	onLoad(){
		let token=uni.getStorageSync('token');
		if(token){
			uni.switchTab({
				url: '/pages/tabbar/tabbar-1/tabbar-1'
			});
		}else{
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
	},
	onShow() {
		let token=uni.getStorageSync('token');
		if(token){
			uni.switchTab({
				url: '/pages/tabbar/tabbar-1/tabbar-1'
			});
		}else{
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
	},
	onHide: function() {
		
	}
};
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
</style>
